<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>实名认证管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/userRealnameAuth/">实名认证列表</a></li>
		<shiro:hasPermission name="sys:userRealnameAuth:edit"><li><a href="${ctx}/sys/userRealnameAuth/form">实名认证添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="userRealnameAuth" action="${ctx}/sys/userRealnameAuth/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>用户：</label>
				<sys:treeselect id="user" name="user.id" value="${userRealnameAuth.user.id}" labelName="user.nickname" labelValue="${userRealnameAuth.user.nickname}"
					title="用户" url="/sys/office/treeData?type=3" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li>
			<li><label>用户姓名：</label>
				<form:input path="realname" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>用户身份证号：</label>
				<form:input path="idno" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>审核状态：</label>
				<form:select path="state" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('realname_auth_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>用户</th>
				<th>用户姓名</th>
				<th>用户身份证号</th>
				<th>审核日期</th>
				<th>申请状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="userRealnameAuth">
			<tr>
				<td><a href="${ctx}/sys/userRealnameAuth/form?id=${userRealnameAuth.id}">
					${userRealnameAuth.user.nickname}
				</a></td>
				<td>
					${userRealnameAuth.realname}
				</td>
				<td>
					${userRealnameAuth.idno}
				</td>
				<td>
					<fmt:formatDate value="${userRealnameAuth.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${fns:getDictLabel(userRealnameAuth.state, 'realname_auth_state', '')}
				</td>
				<td>
    				<a href="${ctx}/sys/userRealnameAuth/auditPass?id=${userRealnameAuth.id}">审核通过</a>
    				<a href="${ctx}/sys/userRealnameAuth/form?id=${userRealnameAuth.id}">查看详情</a>
					<a href="${ctx}/sys/userRealnameAuth/delete?id=${userRealnameAuth.id}" onclick="return confirmx('确认要删除该实名认证吗？', this.href)">删除</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>